<template>
  <view class="home-grid">
    <van-grid square>
      <van-grid-item
        v-for="(grid, index) in gridList"
        :key="index"
        :icon="grid.icon"
        :text="grid.text"
      />
    </van-grid>
  </view>
</template>

<script>
export default {
  data() {
    return {
      gridList: [
        {
          icon: "setting-o",
          text: "设置",
        },
        {
          icon: "fire-o",
          text: "火苗",
        },
        {
          icon: "coupon-o",
          text: "息票",
        },
        {
          icon: "cart-o",
          text: "购物车",
        },
        {
          icon: "friends-o",
          text: "朋友",
        },
        {
          icon: "point-gift-o",
          text: "礼物",
        },
        {
          icon: "service-o",
          text: "服务",
        },
        {
          icon: "medal-o",
          text: "奖牌",
        },
      ],
    };
  },
};
</script>

<style scoped>
.home-grid {
  margin-top: 15px;
}
</style>